package com.oocl.euc.core.attachment.model;

import com.oocl.euc.audit.AuditEntity;

import javax.persistence.*;

@Entity
@Table(name = "PCRS_ATTACHMENT")
@SequenceGenerator(name = "SEQUENCE_GENERATOR", sequenceName = "ATTACHMENT_SEQUENCE", allocationSize = 1)
public class Attachment extends AuditEntity {

    @Lob
    @Column(name = "CONTENT", columnDefinition = "BLOB")
    private byte[] content;

    @Column(name = "FILE_NAME")
    private String fileName;

    @Column(name = "CONTENT_TYPE")
    private String contentType;

    @Column(name = "LENGTH")
    private Long length;

    @Column(name = "MD5_CODE")
    private String md5Code;

    @Column(name = "LOCATION")
    private String location;

    public byte[] getContent() {
        return content;
    }

    public void setContent(byte[] content) {
        this.content = content;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public Long getLength() {
        return length;
    }

    public void setLength(Long length) {
        this.length = length;
    }

    public String getMd5Code() {
        return md5Code;
    }

    public void setMd5Code(String md5Code) {
        this.md5Code = md5Code;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }
}
